package tree;

public class TwoTree {

	public static char[] tree = {'A','B','E','C','D','F','G'};
	
	public static void putChild(int index) {
		System.out.println(tree[index]);
		index = index*2+1;
		if(index < tree.length) {
			putChild(index);
		}
		index = index+1;
		if(index < tree.length) {
			putChild(index);
		}
	}
	
	public static void main(String[] args) {
		int index = 0;
		putChild(index);
	}
}
